<%@ include file="includeTop.jsp" %>
<html>
<head>
<title></title>
<%@ include file="includeTop_head.jsp" %>
</head><body>
<table height="100%" width="100%" align="center"
	style="padding: 0; margin: 0" border=0>
	<tr>
		<td colspan="3"><%@ include file="user_status.jsp"%></td>
	</tr>
	<tr class="title">
		<td><%@ include file="title.jsp"%></td>
		<td align="center"><%@ include file="cartbar.jsp"%></td>
	</tr>
	<tr>
		<td colspan="3" height="80%" valign="top">
		<table border=0 style="padding: 0; margin: 0">
			<tr>
				<td width="197" valign="top"><%@ include
					file="account_left.jsp"%></td>
				<Td width="30"></Td>
				<td width="80%" valign="top">
				<!-- order end -->
				<table class="addresssub" id="cart" width="80%" height="300" cellspacing="0"
					cellpadding="0">
					<tr>
						<th valign="top" align="center" colspan="100" valign="middle" height="25px">My
						Orders</th>
					</tr>
					<tr>
						<td align="center" valign="top" colspan="3">
						<table width="98%" class="product" align="center" border="1"
							cellspacing="2" cellpadding="5">
							<tr>
								<th>Order ID</th>
								<th>Item List</th>
								<th>Receiver</th>
								<th>Total Price</th>
								<th>Status</th>
								<th>Date</th>
								<th></th>
							</tr>

							<c:if test="${empty orders}">
								<tr>
									<td colspan="8"><b>There is no order record. Go and
									buy Some Now!</b></td>
								</tr>
							</c:if>

							<c:forEach var="order" items="${orders}">
								<tr height="25">
									<td align="center"><b> <a
										href="<c:url value="/order/vieworder.do?orderId=${order.orderId}"><c:param name="itemId" value="${cartItem.item.itemId}"/></c:url>">
									<c:out value="${order.orderId}" /> </a></b></td>
									<td align="center"><c:forEach var="item" items="${order.lineItems}">
									     <c:out value="${item.item.product.name}"/> <br>
									    </c:forEach></td>
									<td align="center"><c:out value="${order.shipToFirstName}" /> <c:out
										value="${order.shipToLastName}" /></td>
									<td align="center"><c:out value="${order.totalPrice}" /></td>
									<td align="center"><c:out value="${order.status}" /></td>
									<td align="center"><c:out value="${order.orderDate}" /></td>
									<td align="center"><a href="<c:url value="vieworder.do?orderId=${order.orderId}"/>"/>View Order</a></td>
								</tr>
							</c:forEach>
						</table>
						</td>
					</tr>
				</table>
				<!-- order end --></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td colspan="3"><%@ include file="includeBottom.jsp"%></td>
	</tr>
</table>
</body>
</html>
